import 'package:tot_android_flutter/generated/json/base/json_field.dart';
import 'package:tot_android_flutter/generated/json/tree_item_entity.g.dart';
import 'dart:convert';
export 'package:tot_android_flutter/generated/json/tree_item_entity.g.dart';

@JsonSerializable()
class TreeItemEntity {
	late List<dynamic> articleList;
	late String author;
	late List<TreeItemChildren> children;
	late double courseId;
	late String cover;
	late String desc;
	late double id;
	late String lisense;
	late String lisenseLink;
	late String name;
	late double order;
	late double parentChapterId;
	late double type;
	late bool userControlSetTop;
	late double visible;

	TreeItemEntity();

	factory TreeItemEntity.fromJson(Map<String, dynamic> json) => $TreeItemEntityFromJson(json);

	Map<String, dynamic> toJson() => $TreeItemEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class TreeItemChildren {
	late List<dynamic> articleList;
	late String author;
	late List<dynamic> children;
	late double courseId;
	late String cover;
	late String desc;
	late double id;
	late String lisense;
	late String lisenseLink;
	late String name;
	late double order;
	late double parentChapterId;
	late double type;
	late bool userControlSetTop;
	late double visible;

	TreeItemChildren();

	factory TreeItemChildren.fromJson(Map<String, dynamic> json) => $TreeItemChildrenFromJson(json);

	Map<String, dynamic> toJson() => $TreeItemChildrenToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}